extends Control
@onready var click_sound: AudioStreamPlayer2D = $ClickSound
@onready var music: AudioStreamPlayer2D = $Music
@onready var load_game: CanvasLayer = $LoadGame
@onready var texture_rect: TextureRect = $TextureRect
@onready var texture_rect_2: TextureRect = $TextureRect2


# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	music.play()


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	if Dialogic.VAR.fin:
		texture_rect.texture=texture_rect_2.texture


func _on_game_start_pressed() -> void:
	Dialogic.VAR.loadgame=0
	get_tree().change_scene_to_file("res://scene/main.tscn")
	

func _on_quit_pressed() -> void:
	get_tree().quit()
	click_sound.play()


func _on_load_pressed() -> void:
	load_game.visible=true
